package com.jt.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor

public class SysResult {
    private  Integer status;//200成功  201失败
    private  String msg;   //提示信息
    private  Object data;  //服务器返回值数据
//重载方法一定要注意 耦合性

    public static SysResult fail(){
        return new SysResult(201,"调用失败",null);
    }

    public static SysResult success(Object data){
        return new SysResult(200,"调用失败",data);
    }

    public static SysResult success(String msg){
        return new SysResult(200,"业务调用成功!!",null);
    }


    public static SysResult success(String msg,Object data){
        return new SysResult(200,"业务调用成功!!",null);
    }
}
